package com.sfac.controller;

import com.sfac.account.Role;
import com.sfac.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * RoleController
 */
@RestController
@RequestMapping("/api/account")
public class RoleController {
	@Autowired
	private RoleService roleService;

	/**
	 * 127.0.0.1/api/roles ---- get
	 */
	@GetMapping("/roles")
	public List<Role> getRoles() {
		return roleService.getRoles();
	}
}
